<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>

<html>
<head>
    <title>我的商场 | 用户表单</title>
    <jsp:include page="/includes/header.jsp"/>

</head>
<body class="hold-transition skin-blue sidebar-mini">
<div class="wrapper">
    <jsp:include page="/includes/nav.jsp"/>
    <jsp:include page="/includes/menu.jsp"/>

    <div class="content-wrapper">
        <section class="content">
            <div class="row">
                <div class="col-md-12">
                    <!-- Horizontal Form -->
                    <div class="box box-info">
                        <div class="box-header with-border text-center" >
                            <h3 class="box-title">${tbUsers != null ? "修改" : "添加"}</h3>
                        </div>
                        <!-- /.box-header -->
                        <!-- form start -->
                        <form class="form-horizontal" action="${tbUsers != null ? '/user_from_edit' : '/user_form_add'}" method="post">
                            <div class="box-body">
                                <input id="id" name="id" value="${tbUsers.id}" type="hidden">
                                <div class="form-group">
                                    <label for="userName" class="col-sm-2 control-label">用户名</label>

                                    <div class="col-sm-10">
                                        <input type="text" name="userName" class="form-control" id="userName" placeholder="用户名" value="${tbUsers.userName}">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="inputPassword3" class="col-sm-2 control-label">密码</label>

                                    <div class="col-sm-10">
                                        <input type="password" name="passWord" class="form-control" id="inputPassword3" placeholder="密码" value="${tbUsers.passWord}">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="inputEmail3" class="col-sm-2 control-label">邮箱</label>

                                    <div class="col-sm-10">
                                        <input type="email" name="email" class="form-control" id="inputEmail3" placeholder="邮箱" value="${tbUsers.email}">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="phone" class="col-sm-2 control-label">电话号码</label>

                                    <div class="col-sm-10">
                                        <input type="text" name="phone" class="form-control" id="phone" placeholder="电话号码" value="${tbUsers.phone}">
                                    </div>
                                </div>

                            </div>
                            <!-- /.box-body -->
                            <div class="box-footer">
                                <button type="button" class="btn btn-default" onclick="history.go(-1);">返回</button>
                                <button type="submit" class="btn btn-info pull-right">提交</button>
                            </div>
                            <!-- /.box-footer -->
                        </form>
                    </div>
                    <!-- /.box -->
                </div>
            </div>
        </section>
    </div>

    <jsp:include page="/includes/copyright.jsp"/>
</div>
<jsp:include page="/includes/footer.jsp"/>
</body>
</html>
